<template name="goTop">
	<view>
		<image src="/static/images/icon/top.png" v-if="isTop" class="goTop" @click="goTop"></image>
	</view>
</template>

<script>
	export default {
		name: 'goTop',
		props:['isTop'],
		methods:{
			goTop(){
				if(uni.pageScrollTo){
					uni.pageScrollTo({
						scrollTop: 0
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.goTop{
		@include widthHeight(64rpx);
		position: fixed;
		bottom: 200rpx;
		right: 30rpx;
		opacity: 0.7;
		z-index: 99;
		/* box-shadow: 0px 0px 8px 0px rgba( 0, 0, 0, 0.3); */
	}
</style>
